// const { queryWithPromose } = require("./db");

let query = require("./db").query;
let queryWithPromise = require("./db").queryWithPromose;
// let sql = "select * from myshop.user where user_id=?"
// let values = [1];  //mysql语句简化写法
// let sql = "select * from myshop.user where username=? and password=?";
// let values = ["user","user"]//mysql里面的数据值
// query(sql,values,function(err,results){
//     console.log(results[0].user_id);
// })
let values = [1];  //mysql语句简化写法
let sql = "select * from user_role where user_id=?"
async function test(){
  let {results} = await queryWithPromise(sql,values);
  console.log(results);
}
test()
